<template>
	<view>
		<navbar :tip="tip" :title="title" :isback="true"></navbar>
		<view class="con">
			<view class="text" style="margin-top: 38rpx;">
				<u-parse :tagStyle="style" :content="txtcontent" v-if="type!='Site_ContactQrcode'"></u-parse>
				<image :src="URL(txtcontent)" class="pic" mode="" v-else></image>
			</view>
		</view>
	</view>
</template>

<script>
	import home from '@/api/_home.js'
	export default {
		data() {
			return {
				tip:'',
				txtcontent:'',
				style:{
					span:'font-size: 23rpx!important;color: #747474!important;line-height: 28rpx;!important',
					p:'font-size: 23rpx!important;color: #747474!important;line-height: 28rpx;!important'
				},
				title:'',
				type:''
			};
		},
		computed: {
			height() {
				const height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, 'px');
				return uni.$u.deepMerge(height)
			},
			bheight() {
				const height = uni.$u.addUnit(uni.$u.sys().safeAreaInsets.bottom, 'px');
				return uni.$u.deepMerge(height)
			},
		},
		methods:{
			async gettxt(){
				let res = await home.config({name:this.type})
				if(res.data.code==200){
					this.txtcontent=res.data.data[this.type]
					
				}
			}
			
		},
		onLoad(o) {
			this.title=o.title
			this.type=o.type
			this.gettxt()
		}
	}
</script>

<style lang="scss">
	page {
		background: url('https://mp-b54a63ff-3ce2-4df8-8d6e-f855d8976d34.cdn.bspapp.com/img/Rectangle_113.png') 100% no-repeat;
		background-position: top;
		background-color: #f6f5fa;
		width: 750rpx;
	}
	.con{
		padding: 0 24rpx;
		
	}
	.text{
		height: 42rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 23rpx;
		color: #747474;
		line-height: 40rpx;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.pic{
		width: 500rpx;
		height: 500rpx;
		border-radius: 20rpx;
	}
</style>